<div id="section-panel" *ngFor="let sectionInfo of responses | keyvalue">
  <div class="card margin-bottom-15px alert-success-border">
    <div id="section-header" class="card-header alert alert-success alert-no-bottom cursor-pointer" (click)="toggleAndLoadTab.emit(sectionInfo.key)">
      {{ sectionInfo.key === 'None' ? 'No specific section' : sectionInfo.key }}
      <div class="card-header-btn-toolbar">
        <tm-panel-chevron [isExpanded]="sectionInfo.value.isTabExpanded"></tm-panel-chevron>
      </div>
    </div>
    <div *ngIf="sectionInfo.value.isTabExpanded" @collapseAnim>
      <div *tmIsLoading="!sectionInfo.value.hasPopulated && !sectionInfo.value.errorMessage"></div>
      <tm-loading-retry
              class="m-3"
              [shouldShowRetry]="!!sectionInfo.value.errorMessage"
              [message]="sectionInfo.value.errorMessage"
              (retryEvent)="loadSection.emit(sectionInfo.key)"
      >
        <div *ngIf="sectionInfo.value.hasPopulated" class="card-body">
          <tm-gqr-rqg-view-responses [responses]="sectionInfo.value.questions || []" [sectionOfView]="sectionInfo.key" [section]="section" [sectionType]="sectionType"
                                     [indicateMissingResponses]="indicateMissingResponses"
                                     [groupByTeam]="groupByTeam" [showStatistics]="showStatistics" [isGqr]="true" [session]="session"
                                     [instructorCommentTableModel]="instructorCommentTableModel" [isExpandAll]="isExpandAll"
                                     (instructorCommentTableModelChange)="triggerInstructorCommentTableModelChange($event)"
                                     (updateCommentEvent)="triggerUpdateCommentEvent($event)"
                                     (deleteCommentEvent)="triggerDeleteCommentEvent($event)"
                                     (saveNewCommentEvent)="triggerSaveNewCommentEvent($event)"
                                     style="margin-bottom: 20px;"></tm-gqr-rqg-view-responses>
        </div>
      </tm-loading-retry>
    </div>
  </div>
</div>
